from pylab import *
import ueye 
from slmmanager import SLMManager
import time

################## CONTROLADORES
slm=SLMManager(":0.1")
SLM=SLMManager(":0.0",border=True) 
cam=ueye.Cam(128)


im=imread('lena.png')*255
im2=imread('lena2.jpg')[::-1,:,:]
im3=imread('wolf.png')[:,:,0]*255

### aplicacion porno de lena
#~ k=0
#~ while 1:
	#~ if k%2==0:
		#~ SLM.send(im)
		#~ slm.send(im)
	#~ else:
		#~ SLM.send(im2)
		#~ slm.send(im2)
	#~ 
	#~ time.sleep(.5)
		#~ 
	#~ k+=1	


SLM.send(im3)
slm.send(im3)

time.sleep(.5)

captura=cam.GrabImage()
#captura=captura.astype(double)


imshow(captura)
